<div id="main-wrapper-sec" style="min-height:400px;">
<div class="fshmeAdminBox" style="margin-top:100px;">
<center>
<h3 class="adminTtl">Admin Login</h3><br/>
	<form id="formid" method="post" onsubmit="return validateadminLogin()"/>
	<p class="AdusrNm Adcommon"><span class="Adcmn">User Name:</span><input type="text" id="adminUsername" name="adminUsername"/></p><span style="color:red" id="erroradminUsername"></span>
	<p class="Adpswrd Adcommon"><span class="Adcmn pswd">Password:</span><input type="password" id="adminPassword" name="adminPassword"/></p><span style="color:red" id="erroradminPassword"></span>
	<p class="AdLgn"><input type="submit" value="Login"  /></p>
	</form>
	<?php if(isset($_GET['id'])){ if($_GET['id']==3){  ?>
	<p style="color:red;margin:-35px 0px 0px 117px;" id="loginFailed">*login failed</p>
	<?php } } ?>
</center>
</div>

</div>

<script>
	$('#adminPassword').keypress(function(e){
		if( e.keyCode == 13 ){
			validateadminLogin();
		}
	});
	function validateadminLogin(){
		var flag=true;	
		if($('#adminUsername').val()==""){		
			$('#erroradminUsername').html('*User Name Required');
			flag=false;
		}else{
			$('#erroradminUsername').html('');
		}
		if($('#adminPassword').val()==""){
			$('#erroradminPassword').html('*Password Required');
			flag=false;
		}else{
			$('#erroradminPassword').html('');
		}
		if(flag==false){ 
			return false;
		}
			/*		
			var userEmail=$('#adminUsername').val();
			var userPassword=$('#adminPassword').val();
			$.ajax({
				type:'POST',
				datatype:'json',
				url: ADMIN_BASE_URL+'/admin/admin-login',
				data:{adminUsername:userEmail,adminPassword:userPassword},
				success: function(data){
					if(data.output=='success'){
						$('#loginFailed').html('');
						//alert('<?php echo $this->Url('zfcadmin');?>');
						window.location='<?php echo $this->Url('zfcadmin');?>';
					}else{
						$('#loginFailed').html('Please Enter Valid Username And Password!');
					}
				}
			});
			*/
		
	} 
</script>